Skip to content

Read profile model suggestions from the installed agent - #1183

Merged
onevcat merged 2 commits into
mainfrom
chore/update-profile-model-suggestions
Nov 28, 2026
Merged

onevcat merged 2 commits into
mainfrom
chore/update-profile-model-suggestions

Conversation

@onevcat

@onevcat onevcat commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Model menu in the Agent Profile editor was a hardcoded list that needed a manual update for each new model. For Codex and Claude Code, it now reads the model list that the installed agent caches:

  • Codex: $CODEX_HOME/models_cache.json (the same JSON as codex debug models). Shows the list models in priority order.
  • Claude Code: $CLAUDE_CONFIG_DIR/cache/model-catalog/*-cc.json. Uses the most recently fetched account file. Shows the main section first, then the overflow models.
  • A profile with a dedicated home reads its own home first, then the default home (a dedicated home has no cache until the agent runs there once).
  • Order and limit: the agent's own order. At most 6 models at the top level, and at most 24 more under a More Models submenu.
  • Fallback: when no cache is readable or the format changes, the parsers return nil and the menu shows the built-in list. This PR also refreshes that list (GPT-6.2 Sol/Astra, GPT-6.1 Terra, Fable 5.2, Sonnet 5.5, Haiku 5.5, and the Codex ultra effort).
  • Reasoning Effort suggestions follow the selected model when the catalog lists its levels. For example, gpt-6-luna does not offer ultra, and claude-haiku-4-5-20251001 offers none.
  • A saved model or effort is never changed. A value that is not in the list still shows as a custom value.

Other agents are out of scope for now: their model lists come only from CLI subcommands (some need the network or a login) or from user configuration, and the output is not clean enough yet.

The suggestion control is now a Menu with inline pickers, so it can hold the submenu.

Verification

  • make check, make build-app
  • AgentModelCatalogTests (13 new), AgentRuntimeAdapterTests, AgentProfileEditorFeatureTests: 42 tests pass
  • A temporary probe test (not committed) loaded the real caches on this Mac: Codex 0.171.0 gave 6 + 4 models with per-model efforts, Claude Code 2.1.332 gave 4 main + 9 more models.
  • Not done: Debug visual check of the new menu. The screen was locked during this run.

Codex and Claude Code cache their model list in their home folder. The
profile editor now reads that list, keeps the agent's order, shows the
first models at the top level and the rest under More Models, and falls
back to the built-in list when no cache is readable. Reasoning effort
suggestions follow the selected model.
@onevcat onevcat changed the title Update Codex and Claude profile model suggestions Read profile model suggestions from the installed agent Nov 28, 2026
@onevcat
onevcat merged commit a7636da into main Nov 28, 2026
4 checks passed
@onevcat
onevcat deleted the chore/update-profile-model-suggestions branch November 28, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant